package com.nnnu.wsnackshop.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 库存日志
 * </p>
 *
 * @author zk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("stock_logs")
public class StockLogs implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 日志ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * SKU ID
     */
    private Integer skuId;

    /**
     * 旧库存
     */
    private Integer oldStock;

    /**
     * 新库存
     */
    private Integer newStock;

    /**
     * 变化量
     */
    private Integer changeQty;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 类型：0=order,1=purchase,2=manual_adjust
     */
    private Integer type;

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 备注
     */
    private String remark;

    /**
     * 时间
     */
    private LocalDateTime createdAt;
}
